package com.liao.starapp.user;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;

import com.liao.starapp.R;

public class InfoActivity extends AppCompatActivity implements View.OnClickListener {

    private ImageView img_back;
    private TextView tv_title;
    private TextView tv_content;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_info);
        initView();
        ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.hide();
        }
        getWindow().setStatusBarColor(getColor(R.color.actionBarColor));
    }

    private void initView() {
        img_back = (ImageView) findViewById(R.id.img_back);
        tv_title = (TextView) findViewById(R.id.tv_title);
        tv_content = (TextView) findViewById(R.id.tv_content);

        img_back.setOnClickListener(this);
        tv_title.setText("功能介绍");
        String title1 = "1、星座解析：" + "\n";
        String content1 = "应用对12个星座进行解析。" + "\n\n";

        String title2 = "2、星座配对：" + "\n";
        String content2 = "应用对12个星座进行配对。" + "\n\n";

        String title3 = "3、星座运势：" + "\n";
        String content3 = "应用对12个星座的运势进行全面评估。" + "\n\n";

        String title4 = "4、星座图解：" + "\n";
        String content4 = "应用对12个星座制作了du对应的星座图。" + "\n\n";

        String title5 = "5、更多功能，即将推出..." + "\n";

        String content = title1 + content1 + title2 + content2
                + title3 + content3 + title4 + content4 + title5;
        tv_content.setText(content);
    }

    @Override
    public void onClick(View v) {
        onBackPressed();
        finish();
    }
}
